package com.dmall.algorithm.chapter02.section02;

public class TestTime {

    public static void main(String[] args) {
        for (int i = 1; i < 9; i++) {
            Double dn = Math.pow(10, i);
            int n = dn.intValue();
            long start = System.currentTimeMillis();
            int sum = 0;
            for (int j = 0; j < n; j++) {
                sum += j;
            }
            long end = System.currentTimeMillis();
            System.out.println("10^" + i + " : " + (end - start) / 1000);
        }
    }
}
